﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class AdminPassReset : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void ButtonReset_Click(object sender, EventArgs e)
    {
        MembershipUser user = Membership.GetUser("admin");
        user.UnlockUser();
        user.ChangePassword(user.ResetPassword("admin"), "123456");
    }

    protected void ButtonResetPass_Click(object sender, EventArgs e)
    {
        MembershipUser user = Membership.GetUser(TextBoxUserName.Text);
        user.UnlockUser();
        user.ChangePassword(user.ResetPassword(TextBoxUserName.Text), "123456");
    }
}